package cn.com.taiji.oospub.wechat.service;

import cn.com.taiji.oospub.wechat.entity.CoursesOrders;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.dreamyoung.mprelation.IService;

import java.time.LocalDate;
import java.util.Calendar;
import java.util.List;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author yzd
 * @since 2020-10-28
 */
public interface ICoursesOrdersService extends IService<CoursesOrders> {

    List<CoursesOrders> listByTime(Calendar calendar, Calendar calendar1, Calendar calendar2, Calendar calendar3);

    CoursesOrders findById(String id);

    CoursesOrders findByProperty(String columnName, String value);


    boolean updateOrderStatusByMealCode(String mealCode, CoursesOrders.CoursesOrderStatus oldStatus, CoursesOrders.CoursesOrderStatus newStatus);


    boolean updateOrderStatus(String mealCode, LocalDate localDate, CoursesOrders.CoursesOrderStatus oldStatus, CoursesOrders.CoursesOrderStatus newStatus);

    void updateStatus(CoursesOrders orders);

    List<CoursesOrders> queryList(QueryWrapper<CoursesOrders> queryModel);

    Page queryPage(Page<CoursesOrders> page, QueryWrapper<CoursesOrders> queryModel);
}
